// 防抖
export function shake(func, wait) {
  let timeout = null
  return function() {
      const context = this
      const args = arguments
      if (timeout) clearTimeout(timeout)
      timeout = setTimeout(() => {
          func.apply(context, args)
      }, wait)
  }
}
